home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / misc / emu / BBcpuclk1_0.lha / BBcpuclk1.0 / BBcpuclk.doc < prev    next >
Text File  |  1995-05-19  |  7KB  |  214 lines

  1.  
  2.  
  3.                                BBcpuclk Rev 1.0
  4.  
  5.                         (C) Copyright 1995 Remi Lenoir
  6.  
  7.                              BBcpuclk is FREEWARE
  8.  
  9.  
  10.  
  11.  What is BBcpuclk ?
  12.  ------------------
  13.  
  14.  BBcpuclk is a program that allows some CPU upgrades for 386SX machines to
  15.  work properly with a Commodore A2386SX BridgeBoard. It has been tested with
  16.  the Evergreen RevTo486 (386SX3+) upgrade and a TI486SXLC2-50 chip.
  17.  
  18.  
  19.  The problem
  20.  -----------
  21.  
  22.  The Evergreen SLC3 upgrades uses an enhanced version of the 386SX developed
  23.  by IBM. This enhanced version uses, among other things, a clock tripled core 
  24.  to improve  performance. The problem is when used in a 2386 Bridgeboard
  25.  the CPU hangs when the clock tripler circuit is started. In other words, you
  26.  can use the CPU at 16, 20 or 25Mhz  (depending on which BridgeBoard you have)
  27.  and take advantage of its internal 16KB cache but you can not take advantage
  28.  of the clock tripler. Considering the price of the toy, it's pretty annoying.
  29.  
  30.  
  31.  The reason
  32.  ----------
  33.  
  34.  I was not able to determine the exact reason of the failure except that the
  35.  IBM486SLC3 "doesn't like" the clock it receives from the BridgeBoard.
  36.  
  37.  
  38.  The solution
  39.  ------------
  40.  
  41.  What guided me to the solution is that the clock tripler operates properly when
  42.  the BridgeBoard BIOS is configured with SYSTEM SPEED = LOW.
  43.  
  44.  The solution consists of giving a "better" clock to the CPU. How is this done ?
  45.  This is done by modifying the configuration of the PC chipset used on the
  46.  BridgeBoard. One of the chips (VL82C311) contains a unit that generates the CPU
  47.  clock and the BUS clock. This unit is quite flexible and looks like this:
  48.  
  49.  
  50.                               TURBO ON/OFF
  51.  
  52.                                     |
  53.                                     |
  54.                                     |
  55.                                    \|/
  56.                                  |-----|
  57.            |---------------------|     |
  58.            |                     |     |    \
  59.            |   |-----------|     | MUX |----- CLK2
  60.            |  \|           |    \|     |    /
  61.  TCLK2 ----|---| NON-TURBO |-----|     |
  62.               /|  DIVIDER  |    /|------
  63.                |           |
  64.                |-----------|
  65.                     /|\
  66.                      |
  67.                      |
  68.                      |
  69.                 DIVIDE RATIO
  70.                 (1, 2, 3, 4)
  71.  
  72.  Notes:
  73.  
  74.  - TCLK2 is the output of the oscillator from which the CPU clock is derived.
  75.  - CLK2 is the CPU clock. In a standard 386SX it is divided by two before
  76.    going to the core giving an operating frequency half of CLK2.
  77.    (32Mhz for a 16Mhz system, 40Mhz for a 20Mhz one and 50Mhz for a 25Mhz one).
  78.  
  79.  
  80.  As you can see, you have two ways of giving the CLK2 clock to the CPU. By going
  81.  direct (TURBO option) or by going through the divider and choose a ratio of 1.
  82.  When the BridgeBoard is configured as SYSTEM SPEED = HIGH (in BIOS SETUP), the
  83.  unit is configured in TURBO mode, when SYSTEM SPEED = LOW, the unit is
  84.  configured in NON TURBO with a divide ratio of 2 (half speed).
  85.  
  86.  The solution is to provide CLK2 by going through the divider with a ratio
  87.  of 1 rather than using the TURBO mode. In theory it should be equivalent but
  88.  the Evergreen upgrade does not operate reliably with the TURBO mode whereas it
  89.  does with NON TURBO. I think the clock generated with the NON TURBO mode has
  90.  faster rise time/fall time and/or less skew or something like this that keeps
  91.  the clock tripler circuit happy.
  92.  
  93.  
  94.  The program
  95.  -----------
  96.  
  97.  You have to execute the BBcpuclk program before you start the clock tripler.
  98.  The clock tripler is started when the CPU is configured and this is done by
  99.  the Evergreen configuration program launched in the CONFIG.SYS file. The problem
  100.  is that I am anything but a PC specialist and I don't know how to write a .SYS
  101.  program. Fortunately there is a utility called WRAPPER.SYS that will launch a 
  102.  .COM or .EXE program from the CONFIG.SYS file. Just insert the following line
  103.  in the first line of your CONFIG.SYS file:
  104.  
  105.  DEVICE = WRAPPER.SYS BBcpuclk.com
  106.  
  107.  Then you can insert the call to the Evergreen configuration program.
  108.  
  109.  
  110.  Notes:
  111.  ------
  112.  
  113.  I wrote this program because I upgraded my BridgeBoard by changing the CPU: I
  114.  removed the original 386SX and replaced it with a TI486SXLC2-50. Then, I
  115.  ran into the problem that it would hang when I would start the clock doubler.
  116.  So this clock doubler/clock tripler problem also affects the TI chip. Strangely
  117.  enough, it doesn't seem to affect the Cyrix SRX2-50 upgrades.
  118.  
  119.  (I will later release an AmigaGuide file giving more information on how to
  120.  upgrade a BridgeBoard).
  121.  
  122.  When I finally got my system to work (thanks to Brian for providing me with the
  123.  VL82C311 data sheet) I remembered reading posts about the Evergreen upgrade
  124.  not working well and thought that people with an Evergreen might have the same
  125.  problem. That's around the time that I met Peter on c.s.a.emulations and provided
  126.  him with the program. He did BETA testing and later got in touch with Gary who
  127.  found the WRAPPER program putting an end to the config.sys problem.
  128.  
  129.  I still don't know the exact reason why the CPU hangs when its clock does not
  130.  go through the divider. I might take a closer look at that later but as
  131.  everything is working...
  132.  
  133.  Although this program is working for me and at least two other persons, I can
  134.  not guarantee that it will work for others, neither I can guarantee that the
  135.  information given in this file is valid or accurate. You use this program and
  136.  this information at your own risk.
  137.  
  138.  
  139.  BBcpuclk source code:
  140.  ---------------------
  141.  
  142. ;
  143. ; BBcpuclk.asm
  144. ;
  145. ; (C) Copyright 1995 Remi Lenoir
  146. ;
  147. cseg    segment
  148.     assume     cs:cseg,ds:cseg
  149.     org    100h
  150. start:    mov    al,7
  151.     out    0ech,al
  152.     in    al,0edh        ;read CLKTCL register
  153.     and    al,9fh        ;set NON TURBO divider ratio to 1
  154.     out    0edh,al        ;write CLKCTL register
  155.     mov    al,0
  156.     out    0f4h,al        ;switch to NON TURBO mode
  157. exit:    mov    al,0
  158.     mov    ah,04ch
  159.     int    21h
  160.     db    'BBcpuclk (C) Copyright 1995 Remi Lenoir'
  161. cseg    ends
  162.     end start
  163.  
  164.  
  165.  This program was assembled using a public domain 80x86 assembler called A86.
  166.  A86 can be found on a SIMTEL archive (/msdos/asmutil/a86v372.zip).
  167.  
  168.  If you know how to write a .SYS version of BBcpuclk, I would like to here
  169.  from you.
  170.  
  171.  
  172.  WRAPPER.SYS:
  173.  -----------
  174.  
  175.  This program can be found on a SIMTEL archive (/msdos/bootutil/wrapsy10.zip)
  176.  or from compuserve.
  177.  
  178.  WRAPPER.SYS is Copyright (1992) by Philip B. Gardner.
  179.  
  180.  
  181.  Distribution:
  182.  -------------
  183.  
  184.  BBcpuclk is FREEWARE. It is not public domain. The author gives permission for
  185.  BBcpuclk to be freely distributed provided that copying charges remain in the
  186.  same range as Fred Fish and that no modification is made to the original 
  187.  distribution.
  188.  
  189.  If you want to include BBcpuclk in a commercial product, please contact me.
  190.  
  191.  My current email address is dvs@netcom.com. As I share this mailbox with other
  192.  persons, I would rather prefer you  post questions in the c.s.a.emulations
  193.  newsgroup that I regularly check.
  194.  
  195.  
  196.  Credits:
  197.  --------
  198.  
  199.  I would like to thank the following persons:
  200.  
  201.    - Brian J. Heyboer for providing me with the VL82C311 data-sheet.
  202.  
  203.    - Peter Ouzts for BETA testing the program on the Evergreen upgrade.
  204.  
  205.    - Gary S. Cooper for BETA testing the program and pointing  out the
  206.      WRAPPER.SYS program.
  207.  
  208.  
  209.  and all other persons who have shared information on the BridgeBoard.
  210.  
  211.  
  212.  Remi.
  213.  
  214.